package tech.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.Cost;
import tech.aistar.entity.House;
import tech.aistar.mapper.AgentMapper;
import tech.aistar.mapper.CostMapper;
import tech.aistar.service.ICostService;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: shuaiguo
 * @Date: 2020/10/01/17:41
 * @Description:
 */
@Service
public class CostImpl implements ICostService {
    @Autowired
    private CostMapper costMapper;
    @Override
    public List<Cost> selectAll() {
        return costMapper.selectAll();
    }

    @Override
    public void insert(Cost cost) {
costMapper.insert(cost);
    }

    @Override
    public void updateByPrimaryKey(Cost cost) {
costMapper.updateByPrimaryKey(cost);
    }

    @Override
    public void deleteByPrimaryKey(Integer id) {
costMapper.deleteByPrimaryKey(id);
    }

    @Override
    public Cost findById(Integer integer) {
        return  costMapper.findById(integer);
    }

    @Override
    public Cost findByhouseId(Integer integer) {
        return costMapper.findByhouseId(integer);
    }

}
